<%@ page language="java" import="pos.domain.*,java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>elegirMiCasa</title>
<link rel="stylesheet" type="text/css" href="style/style.css" />
<style type="text/css">
<!--
    #cabecera td{background-color: rgb(238, 238, 238);}
      #productos td{
        border-top-width: 1px;
    border-top-style: solid;
         border-top-color: rgb(153, 0, 51);
    }
-->
</style>
</head>
<body>

<%


%>
<div id="top">
<jsp:include  page="head.html"/>
</div>

<div id="content">
<table summary ="mis casas" cellSpacing="1" cellPadding="6" width="770" align="center" border="0">
    <tr valign ="middle" align="center">
        <td  colspan="6"><b>Mis Casas</b></td>
    </tr>
    <tr valign ="middle" align="center" id="cabecera">
        <td>&nbsp;</td><td>localizacion</td><td>capacidad</td> <td>elegir</td>
    </tr>

<%     
		String suPid=request.getParameter("pid");
		
		
        String email = (String) session.getAttribute("session.user"); 
        UserManager um = new UserManager();
        List<Property> misCasas = um.getMyPropertys(email);
        for (Iterator<Property> iter= misCasas.iterator(); iter.hasNext();) {
            Property p = (Property) iter.next(); 
            %>
            <tr align="center" id="productos">
                <td>--</td>
                <td> <%=p.getAddress()%> </td>
                <td> <%=p.getCountry()%> </td>
                <td> <a href="FrontController?res=fechas.jsp?suPid=<%=suPid%>&miPid=<%=p.getPropertyID()%>"><img src='img/intercambio.gif'> </a></td>
            </tr>
            <%
        }
%>

     
  
</table>
</div>
</body>
